package com.zd.dto;

import java.text.SimpleDateFormat;

/**
 * 暴露秒杀地址DTO
 * @author 63088
 *
 */
public class Exposer {
//	是否开启秒杀
	private boolean exposed;
	private long secKillId;
//	md5加密
	private String md5;
	//当前毫秒
	private long now;
	//秒杀开始时间
	private long start;
	//秒杀结束时间
	private long end;
	
	public Exposer(boolean exposed, long secKillId, String md5) {
		super();
		this.exposed = exposed;
		this.secKillId = secKillId;
		this.md5 = md5;
	}

	public Exposer(boolean exposed,long secKillId, long now, long start, long end) {
		super();
		this.exposed = exposed;
		this.secKillId = secKillId;
		this.now = now;
		this.start = start;
		this.end = end;
	}

	public Exposer(boolean exposed, long secKillId) {
		super();
		this.exposed = exposed;
		this.secKillId = secKillId;
	}

	public boolean isExposed() {
		return exposed;
	}

	public void setExposed(boolean exposed) {
		this.exposed = exposed;
	}

	public long getSecKillId() {
		return secKillId;
	}

	public void setSecKillId(long secKillId) {
		this.secKillId = secKillId;
	}

	public String getMd5() {
		return md5;
	}

	public void setMd5(String md5) {
		this.md5 = md5;
	}

	public long getNow() {
		return now;
	}

	public void setNow(long now) {
		this.now = now;
	}

	public long getStart() {
		return start;
	}

	public void setStart(long start) {
		this.start = start;
	}

	public long getEnd() {
		return end;
	}

	public void setEnd(long end) {
		this.end = end;
	}

	@Override
	public String toString() {
		SimpleDateFormat format = new SimpleDateFormat("yy-MM-dd HH:mm:ss");
		return "Exposer [exposed=" + exposed + ", secKillId=" + secKillId
				+ ", md5=" + md5 + ", now=" + format.format(now) + ", start=" + format.format(start)
				+ ", end=" + format.format(end) + "]";
	}
	
}
